<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="按钮" onclick="fn()">

<script>
function fn() {
    for (let i = 0; i <10 ; i++) {
        alert(i)
    }
}

    function f1() {
        alert("f1")
    }

    //f1()

    function f2(name, age) {
        alert(name + ":" + age);
    }

    //f2("张三",213)

    function f3() {
        return "我是返回值"
    }
    let info = f3()
    alert(info)

    function f4(x,y) {
    return x*y
    }
    let result = f4(3,1)
    alert(result)

    let f5 = function (name,age) {
        alert(name+":"+age)
    }
    f5("张三",61)

    let f6 = new Function("name","age","alert(name+':'+age)");
    f6("长大",23)
</script>
</body>
</html>